#include "mainwindow.h"
#include "ui_mainwindow.h"

#include <QDialog>
#include "mydialog.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_clicked()
{
    //1.创建QDialog对象
    MyDialog* dialog = new MyDialog(this);
    dialog->resize(400,200);//设置对话框大小

    //2.设置对话框标题
    dialog->setWindowTitle("这是我自定义的对话框的title");
    dialog->show();
}
